<h1>Listing ads</h1>

<table>
  <tr>
    <th>Photo</th>
    <th>Title</th>
    <th>Owner</th>
  </tr>

<% @ads.each do |ad| %>
  <tr>
    <td><%=h ad.photo %></td>
    <td><%=h ad.title %></td>
    <td><%=h ad.owner %></td>
    <td><%= link_to 'Show', ad %></td>
    <td><%= link_to 'Edit', edit_ad_path(ad) %></td>
    <td><%= link_to 'Destroy', ad, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New ad', new_ad_path %>